import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect: '/home'
  },
  {
    //首页
    path: '/home',
    component: () => import('../views/Home'),
  }
  ,
  {
    //新房
    path: '/newhouse',
    component: () => import('../views/Home/Newhouse'),
  },
  {
    //新房 的 地图找房
    path: '/maproom',
    component: () => import('../views/Home/Newhouse/Maproom'),
  },
  {
    //新房 的 城市定位
    path: '/floor',
    component: () => import('../views/Home/Newhouse/Floor'),
  },
  {
    //二手房
    path: '/secondhouse',
    component: () => import('../views/Home/Secondhouse'),
  }
  ,
  {
    //出租房
    path: '/taxihouse',
    component: () => import('../views/Home/Taxihouse'),
  }
  ,
  {
    //消息
    path: '/news',
    component: () => import('../views/Home/News'),
  }
  ,
  {
    //求租
    path: '/wanted',
    component: () => import('../views/Home/Wanted'),
  }
  ,
  {
    //求购
    path: '/buy',
    component: () => import('../views/Home/Buy'),
  }
  ,
  {
    //楼市圈
    path: '/housingring',
    component: () => import('../views/Home/Housingring'),
  }
  ,
  {
    //发布楼市圈
    path: '/publishroom',
    component: () => import('../views/Home/Publishroom'),
  }
  ,
  {
    //直播
    path: '/live',
    component: () => import('../views/Home/Live'),
  }
  ,
  {
    //添加直播
    path: '/addlive',
    component: () => import('../views/Home/Addlive'),
  }
  ,
  {
    //团购
    path: '/group',
    component: () => import('../views/Home/Group'),
  }
  ,
  {
    //团购详情
    path: '/detail2/:id',
    component: () => import('../views/Detail2'),
  }
  ,
  {
    //开团
    path: '/startgroup/:id',
    component: () => import('../views/Home/Startgroup'),
  }
  ,
  {
    //排行榜
    path: '/rankinglist',
    component: () => import('../views/Home/Rankinglist'),
  }
  ,
  {
    //排行榜  信息聊天
    path: '/newschat',
    component: () => import('../views/Home/Newschat'),
  }
  ,
  {
    //排行榜  打电话
    path: '/number',
    component: () => import('../views/Home/Number'),
  }
  ,
  {
    //租房战绩
    path: '/record',
    component: () => import('../views/Home/Record'),
  }
  ,
  {
    //卖房战绩
    path: '/recordbuy',
    component: () => import('../views/Home/Recordbuy'),
  }
  ,
  {
    //登录
    path: '/login',
    component: () => import('../views/Login'),
  }
  ,
  {
    //新房详情
    path: '/detail/:id',
    component: () => import('../views/Detail'),
  }

]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
